/**
 * PassiveGossipThread.java
 * ************************** 
 * @date Mar 21, 2011
 * @author Michele Tamburini
 * 
 * **************************
 */
package gossipServices.gossipThread;

import gossipServices.basic.view.PartialView;

/**
 * Description: 
 * Abstract class that explicitly let its subclasses specify the actions
 * performed by a PassiveThread during the gossip by implementing the 
 * method: passiveGossipInstructions().
 *
 */
public abstract class PassiveGossipThread extends GossipThread 
		implements GossipThreadsInstructions, PassiveGossipThreadInterface {

	/**
	 * @param name
	 * @param cycleLenghtMsec
	 * @param view
	 * @param gossipProtocol
	 */
	public PassiveGossipThread(String name, long cycleLenghtMsec,
			PartialView view) {
		super(name, cycleLenghtMsec, view);
		this.gossipProtocol = this;
	}
	
	public void gossipThreadInstructions() throws InterruptedException{
		passiveThreadInstructions();
	}
	
	/**
	 * A class supposed to be a PassiveThread during the gossip protocol,
	 * has to implement this particular method by specifying the actions that 
	 * have to be performed by the PassiveThread of a gossip algorithm.
	 * @throws InterruptedException
	 */
	abstract public void passiveThreadInstructions() throws InterruptedException;
}
